<template>
	<view><!-- 任务名 任务详情  成绩  评论  -->
			<view class="cu-card dynamic" :class="isCard?'no-card':''" v-for="(item,i) in taskList" :key="i">
				<view class="cu-item shadow">
					<view class="cu-list menu-avatar">
						<view class="cu-item">
							<view class="content flex-sub">
								<view class="text-gray">
									任务名称：{{item.title}}
								</view>
								<view class="text-gray text-sm flex justify-between">{{item.name}}</view>
								<view class="text-gray text-sm flex justify-between">任务内容：{{item.taskContent}}</view>
							</view>
						</view>
					</view>
					<view class="text-content">
						解答：{{item.execContent}}
					</view>
					<view class="grid flex-sub padding-lr" :class="isCard?'col-3 grid-square':'col-1'">
						<image style="width: 300px; height: 300px; background-color: #eeeeee;" :src="item.picUrl"
							@error="imageError"></image>
					</view>
					<view class="grid flex-sub padding-lr" :class="isCard?'col-3 grid-square':'col-1'">
						<video id="myVideo" :src="item.videoUrl" @error="videoErrorCallback" controls></video>
					</view>
					<view class="grid flex-sub padding-lr" :class="isCard?'col-3 grid-square':'col-1'">
						<view class="text-content">成绩：{{ item.score }}分</view>
					</view>
					<view class="grid flex-sub padding-lr" :class="isCard?'col-3 grid-square':'col-1'">
						<view class="text-content">老师评价：{{ item.content }}</view>
					</view>
				</view>
			</view>
	</view>
</template>

<script>
	export default {
		// components: {uniNavBar},
		data() {
			return {
				taskList: []
			}
		},
		created() {
			this.getData();
		},
		methods: {
			getData() {
				let teaId = uni.getStorageSync('teaId');
				uni.request({
					url: 'http://localhost:8082/task_admin/evaluate/list?teaId=' + teaId,
					success: (res) => {
						if (res.data.code == 200) {
							this.taskList = res.data.data
						}
					}
				})
			}
		}
	}
</script>

<style>
</style>
